<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>借阅者登录页面</title>
	<!--	通义千文   -->
	<script
			async
			defer
			src="http://localhost:8080/api/application/embed?protocol=http&host=localhost:8080&token=3f333dcb1eb00b72">
	</script>
<link rel="stylesheet" href="./public/css/readerLogin.css" />
<style>
	button:hover{
		background-color:#ffd6e7;
	}
</style>
</head>
<body>
	<div id="login" class="loginBox">
		<h2>Reader</h2>
		<form  method="post">
			<div class="item">
				<input type="text" name="user" required>
				<label>userName</label>
			</div>
			<div class="item">
				<input type="password" name="psw" required>
				<label>password</label>
			</div>
			<input type="submit" class="btn" value="登录" onclick="javascript:void(0);">
				<span></span>
				<span></span>
				<span></span>
				<span></span>
			</input>
		</form>
	</div>

	<div style="position:fixed; top: 0; left: 0;">
		<a href="loginManager.html" target="_blank"><img src="public/image/客户还款统计.png" width="50px" height="50px"></a><br>
		<a href="adminLogin.html" target="_blank"><img src="public/image/征信指标配置.png" width="50px" height="50px"></a>
	</div>
	<script src="./public/js/layer/layer.js"></script>
	<script>
	$(function(){
		//登录	
		$("input[type=submit]").click(function(){
			
			$.ajax({
				url: "./readerLogin",
				type: "post",
				data: $("form").serialize(),
				dataType: "json",
				success: function( data ){
					if(data.code == 0){
						layer.msg("登录成功", {
							icon: 6,
							time: 1000
						}, function(){
							location.href = data.url;
						})
					}else{
						layer.open({
							title: "登录失败",
							content: data.msg,
							icon: 5,
							anim: 6
						})
					}
				}
			})
			return false;
		})
	})
	</script>
</body>
</html>